﻿using SS.FitnessTracker.Fitbit.Enums;
using SS.FitnessTracker.Fitbit.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SS.FitnessTracker.Fitbit
{
    public interface IFitbitClient
    {
        ApiSubscription AddSubscription(APICollectionType apiCollectionType, string uniqueSubscriptionId);
        ApiSubscription AddSubscription(APICollectionType apiCollectionType, string uniqueSubscriptionId, string subscriberId);
        DateTime? GetActivityTrackerFirstDay();
        List<TrackerAlarm> GetAlarms(string deviceId);
        BloodPressureData GetBloodPressure(DateTime date);
        BloodPressureData GetBloodPressure(DateTime date, string userId);
        BodyMeasurements GetBodyMeasurements(DateTime date);
        BodyMeasurements GetBodyMeasurements(DateTime date, string userId);
        Activity GetDayActivity(DateTime activityDate);
        ActivitySummary GetDayActivitySummary(DateTime activityDate);
        System.Collections.Generic.List<Device> GetDevices();
        Fat GetFat(DateTime startDate, DateRangePeriod period);
        Fat GetFat(DateTime startDate, DateTime? endDate = null);
        Food GetFood(DateTime date, string userId = null);
        System.Collections.Generic.List<UserProfile> GetFriends();
        IntradayData GetIntraDayTimeSeries(IntradayResourceType timeSeriesResourceType, DateTime dayAndStartTime, TimeSpan intraDayTimeSpan);
        SleepData GetSleep(DateTime sleepDate);
        ActivityGoals SetStepGoal(int newStepGoal);
        System.Collections.Generic.List<ApiSubscription> GetSubscriptions();
        TimeSeriesDataList GetTimeSeries(TimeSeriesResourceType timeSeriesResourceType, DateTime endDate, DateRangePeriod period);
        TimeSeriesDataList GetTimeSeries(TimeSeriesResourceType timeSeriesResourceType, DateTime endDate, DateRangePeriod period, string userId);
        TimeSeriesDataList GetTimeSeries(TimeSeriesResourceType timeSeriesResourceType, DateTime startDate, DateTime endDate);
        TimeSeriesDataList GetTimeSeries(TimeSeriesResourceType timeSeriesResourceType, DateTime startDate, DateTime endDate, string userId);
        TimeSeriesDataListInt GetTimeSeriesInt(TimeSeriesResourceType timeSeriesResourceType, DateTime baseDate, string endDateOrPeriod, string userId);
        TimeSeriesDataListInt GetTimeSeriesInt(TimeSeriesResourceType timeSeriesResourceType, DateTime endDate, DateRangePeriod period);
        TimeSeriesDataListInt GetTimeSeriesInt(TimeSeriesResourceType timeSeriesResourceType, DateTime endDate, DateRangePeriod period, string userId);
        TimeSeriesDataListInt GetTimeSeriesInt(TimeSeriesResourceType timeSeriesResourceType, DateTime startDate, DateTime endDate);
        TimeSeriesDataListInt GetTimeSeriesInt(TimeSeriesResourceType timeSeriesResourceType, DateTime startDate, DateTime endDate, string userId);
        UserProfile GetUserProfile();
        UserProfile GetUserProfile(string encodedUserId);
        Weight GetWeight(DateTime startDate, DateRangePeriod period);
        Weight GetWeight(DateTime startDate, DateTime? endDate = null);
        ApiSubscription RemoveSubscription(APICollectionType apiCollectionType, string uniqueSubscriptionId);
        HeartRateLog LogHeartRate(HeartRateLog log, string userId);
        HeartRates GetHeartRates(DateTime date);
        void DeleteHeartRateLog(int logId);
    }
}
